<template>
	<view class="flex-col relative page" >


		<!-- <text class="self-center font_3 text_4">接单任务大厅</text> -->

			<view class="flex-row items-center justify-between"  style="padding: 10rpx 30rpx"  >

					<view  clas="flex flex-1" style="flex:1">

						<getlocation   width="400rpx"></getlocation>
					</view>


					<view class="flex  justify-center items-center align-center "
					 style="position:relative;color:#ffffff;width:160rpx;padding: 6px 0; background-color: #ffbd52;border-radius: 20rpx;height: 48rpx;border:1px solid #fff;font-size:24rpx"
					  @click="$refs.popup.open();">
				高级搜索

				<!-- <text class="f12-size t-color-w    bg-color-r   b-radius-30  flex  flex-col  items-center align-center" style="width:40rpx;height:40rpx;position:absolute; right:0;top:-10px;">X</text> -->
					</view>



			</view>
<view class="flex-row items-center justify-start"  style="padding:10rpx 30rpx"  v-if="province || provinceTo"  >

	<view class="flex flex-row justify-center items-center align-center f10-size t-color-y1"    v-if="province"  @tap.stop="delFrom()"
					 style="position:relative;width:auto;padding: 6px 0; border-radius: 20rpx;height: 48rpx;margin:0 60rpx 0 0" >
				发货地：{{province}}{{city}}{{area}}

				<text class="f10-size  t-color-b        b-radius-30  flex  flex-col  items-center align-center" style="width:40rpx;height:40rpx;position:absolute; right:-10px;top:0;">X</text>
	</view>


<!-- 	<view class="flex flex-row justify-center items-center align-center  f10-size t-color-y1"  v-if="provinceTo"  @tap.stop="delTo()"
					 style="position:relative;width:auto;padding: 6px 0; border-radius: 20rpx;height: 48rpx;margin:0 40rpx 0 0" >
				送货地：{{provinceTo}}{{cityTo}}{{areaTo}}

				<text class="f10-size t-color-b       b-radius-30  flex  flex-col  items-center align-center" style="width:40rpx;height:40rpx;position:absolute; right:-10px;top:0;">X</text>
	</view> -->

</view>
<!--
						<view class="padding-10 b-bottom">
							<view class="flex f-a-c f-j-s">
								<text class="f12-size t-color-6">发货地</text>
							</view>
							<view class="flex margin-t15"  @tap="openPicker">
								<view class="flex flex-1 b-radius-30 bg-color-f7 h-30">
								<view class="flex-col justify-start items-start flex-auto text-wrapper_3">
								 <view class=" flex-row text_7  justify-start items-start" >
																				<text class="font_5 "><input  style="width:140rpx;" v-model="province" placeholder="请选择省"></text><text></text>
																				<text class="font_5 "><input  style="width:140rpx;" v-model="city" placeholder="请选择市"></text><text></text>
																				<text class="font_5 "><input  style="width:140rpx;" v-model="area" placeholder="请选择区"></text>
																		 </view>
								</view>
								</view>
							</view>
						</view>
						<view class="padding-10 b-bottom">
							<view class="flex f-a-c f-j-s">
								<text class="f12-size t-color-6">送货地</text>
							</view>
							<view class="flex margin-t15"  @tap="openPickerTo">
								<view class="flex flex-1 b-radius-30 bg-color-f7 h-30">
									<view class="flex-col justify-start items-start flex-auto text-wrapper_3">
									 <view class=" flex-row text_7  justify-start items-start" >
																					<text class="font_5 "><input  style="width:140rpx;" v-model="provinceTo" placeholder="请选择省"></text><text></text>
																					<text class="font_5 "><input  style="width:140rpx;" v-model="cityTo" placeholder="请选择市"></text><text></text>
																					<text class="font_5 "><input  style="width:140rpx;" v-model="areaTo" placeholder="请选择区"></text>
																			 </view>
									</view>
								</view>
							</view>
						</view> -->

		<uni-popup ref="popup" type="right" background-color="#fff">
				<view class="h100 bg-color-w wrap-filter-popup" style="width: 70vw;">
					<!-- <scroll-view scroll-y="true" :style="{'height': height+'px'}"> -->
					<scroll-view scroll-y="true" style="min-height:160rpx;height:auto">
						<!-- <view :style="{ 'padding-top': top+44 + 'px' }"></view> -->
						<view class="padding-10 b-bottom">
							<view class="flex f-a-c f-j-s">
								<text class="f12-size t-color-6">发货地</text>
							</view>
							<view class="flex margin-t15"  @tap="openPicker">
								<view class="flex flex-1 b-radius-30 bg-color-f7 h-30">
								<view class="flex-col justify-start items-start flex-auto text-wrapper_3">
								 <view class=" flex-row text_7  justify-start items-start" >
																				<text class="font_5 "><input  style="width:140rpx;" v-model="province" placeholder="请选择省"></text><text></text>
																				<text class="font_5 "><input  style="width:140rpx;" v-model="city" placeholder="请选择市"></text><text></text>
																				<text class="font_5 "><input  style="width:140rpx;" v-model="area" placeholder="请选择区"></text>
																		 </view>
								</view>
								</view>
							</view>
						</view>
						<!-- <view class="padding-10 b-bottom">
							<view class="flex f-a-c f-j-s">
								<text class="f12-size t-color-6">送货地</text>
							</view>
							<view class="flex margin-t15"  @tap="openPickerTo">
								<view class="flex flex-1 b-radius-30 bg-color-f7 h-30">
									<view class="flex-col justify-start items-start flex-auto text-wrapper_3">
									 <view class=" flex-row text_7  justify-start items-start" >
																					<text class="font_5 "><input  style="width:140rpx;" v-model="provinceTo" placeholder="请选择省"></text><text></text>
																					<text class="font_5 "><input  style="width:140rpx;" v-model="cityTo" placeholder="请选择市"></text><text></text>
																					<text class="font_5 "><input  style="width:140rpx;" v-model="areaTo" placeholder="请选择区"></text>
																			 </view>
									</view>
								</view>
							</view>
						</view> -->
					<!-- 	<view class="padding-10 b-bottom">
							<view class="flex f-a-c f-j-s">
								<text class="f12-size t-color-6">{{i18n['价格区间']}}</text>
							</view>
							<view class="flex margin-t15">
								<view class="flex flex-1 b-radius-30 bg-color-f7 h-30">
									<input v-model="min" class="f12-size input w100 h100" type="number" :placeholder="i18n['最低价']">
								</view>
								<view class="flex f-s-0 f-a-c f-j-c t-color-9 padding-lr15"><text class="b-bottom w-30"></text></view>
								<view class="flex flex-1 b-radius-30 bg-color-f7 h-30">
									<input v-model="max" class="f12-size input w100 h100" type="number" :placeholder="i18n['最高价']">
								</view>
							</view>
						</view> -->



					</scroll-view>
					<view class="flex f-a-c f-j-e padding-lr10 h-60">
						<view class="flex w-160 b-radius-30 h-36 over-h">
							<view @click="reset" class="flex flex-1 f-a-c f-j-c bg-color-linear-y t-color-w">重置</view>
							<view @click="seach()" class="flex flex-1 f-a-c f-j-c bg-color-p t-color-w">确定</view>
						</view>
					</view>
				</view>
			</uni-popup>





		<view class="flex-col group_5 space-y-17">

			<scroll-view class="padding-12 safe-area bg-color-f7" @scrolltolower="loadList" scroll-y="true"
				style="height: 100%;">
				<view v-if="list.length <= 0" class="flex f-a-c f-j-c f-c">
					<view class="padding-30"></view>
					<no-data></no-data>
				</view>

				<view class="flex-col section_7 space-y-23" 
					v-for="item,index in list">
					<view class="flex-row justify-between items-center">
						<view class="flex-row items-center space-x-16">
							<view class="flex-col justify-start items-center text-wrapper"  v-if="item.urgentStatus == 1"><text
									class="font_4">加急</text>
							</view>
							<view class="flex-row items-center space-x-8">
								<text class="font_5 text_24">{{item.sendCity }}</text>
								<image class="shrink-0 image_5"
									src="https://qiniu.ccchongya.com/chongya/images/16947555379102027670.png" />
								<text class="font_5 text_25">{{item.receiveCity }}</text>
							</view>
						</view>
						<text class="font_6 text_26">发布时间：{{item.addTime  | time}}</text>
					</view>
					<view class="flex-col">
						<view class="flex-row items-left group_2 space-x-10">
							<image class="shrink-0 image_6"
								src="https://qiniu.ccchongya.com/chongya/images/16947555379294184525.png" />
							<view class="flex-col flex-auto group_6 space-y-8">
								<view class="flex-row justify-between">
									<text class="font_1 flex" style="flex:4">宠物类型：{{item.petType}}</text>
									<text class="font_1 flex" style="flex:3;">检疫证书：：{{item.jianyiCert?"有":'无'}}</text>
								</view>
								<view class="flex-row justify-between">
									<text class="font_1 flex" style="flex:4;">宠物体积：{{item.petVolume}}</text>
									<text class="font_1 flex" style="flex:3;">笼具大小：{{item.cageSize}}</text>
								</view>
								<view class="flex-row justify-between ">
									<text class="font_1 flex" style="flex:4;">期望运输方式：{{item.haulMethod}}</text>
									<text class="font_1 flex" style="flex:3;">接送服务：{{item.shuttle}}</text>
								</view>
							</view>
						</view>
						<view class="flex-col justify-start items-start text-wrapper_2" v-if="item.message">
							<text class="font_6 text_9">
								{{item.message}}
							</text>
						</view>
						<view class="flex-row justify-between  align-center group_7">
						<view class="flex-col  items-center text-wrapper_6"><text class="font_3" @tap.stop="goDetail(item)">查看详情</text></view>
						<view class="flex-col  items-center text-wrapper_7"><text class="font_3" @tap.stop="goDetailPrice(item)">立即报价</text></view>


					<!-- 		<view class="flex-col justify-start items-center text-wrapper_7"><text class="font_3"
									@tap.stop="baojia(item)">立即报价</text></view> -->
						</view>
					</view>
				</view>
			</scroll-view>
		</view>


		<u-popup :show="showChaseDialog" @close="close" @open="open">


				<view class="flex-col  " v-show="showChaseDialog">
					<view class="flex-col section_3 space-y-12">
						<text class="self-start text_10">报价</text>
						<view class="flex-col section_4 space-y-23">
							<view class="flex-row justify-between items-center">
								<view class="flex-row items-center space-x-16"  style=" flex-shrink: 0;">
									<view class="flex-col justify-start items-center text-wrapper"  v-if="itemnow.urgentStatus == 1"><text
											class="font_4">加急</text></view>
									<view class="flex-row items-center space-x-8">
										<text class="font_5 text_11">{{itemnow.sendCity }}</text>
										<image class="shrink-0 image_5"
											src="https://qiniu.ccchongya.com/chongya/images/16947555379102027670.png" />
										<text class="font_5 text_12">{{itemnow.receiveCity }}</text>
									</view>
								</view>
								<text class="font_6 text_13">发布时间：{{itemnow.addTime  | time}}</text>
							</view>
							<view class="flex-col">
								<view class="flex-row items-center group_2 view space-x-10">
									<image class="shrink-0 image_6"
										src="https://qiniu.ccchongya.com/chongya/images/16947555379294184525.png" />
									<view class="flex-col flex-auto space-y-10">

										<view class="flex-row justify-between">
											<text class="font_1 flex" style="flex:4">宠物类型：{{itemnow.petType}}</text>
											<text class="font_1 flex" style="flex:3;">检疫证书：：{{itemnow.jianyiCert?"有":'无'}}</text>
										</view>
										<view class="flex-row justify-between">
											<text class="font_1 flex" style="flex:4;">宠物体积：{{itemnow.petVolume}}</text>
											<text class="font_1 flex" style="flex:3;">笼具大小：{{itemnow.cageSize}}</text>
										</view>
										<view class="flex-row justify-between ">
											<text class="font_1 flex" style="flex:4;">期望运输方式：{{itemnow.haulMethod}}</text>
											<text class="font_1 flex" style="flex:3;">接送服务：{{itemnow.shuttle}}</text>
										</view>

									</view>
								</view>
								<view class="flex-col justify-start items-start self-start text-wrapper_3">
									<text class="font_6 text_9">
										{{itemnow.message}}
									</text>
								</view>
								<view class="flex-col group_4">



						<view class="flex-row justify-between  items-center text-wrapper_4" v-if='showprice.price'>
						<text class="font_7 text_23 items-start" >宠物快车 给出报价：</text>
						<view class="flex-row items-center"><input   style="background-color: #e5e5e5;height:60rpx;padding:8px;margin-right:10px;" type="number" v-model="formData.price" class="bj-price" placeholder="¥0.00"  placeholder-style=""/>元
						<text @tap.stop="showprice.price=false" class=" items-end" style="margin-left:20rpx;color:#e5e5e5;border:1px solid #e5e5e5;display: inline-block; border-radius: 50%;width:40rpx;line-height:36rpx;text-align:center">-</text>
						</view>
						</view>


						<view class="flex-row justify-between  items-center text-wrapper_4" v-if='showprice.price1'>
						<text class="font_7 text_23 items-start" >铁路运输 给出报价：</text>
						<view class="flex-row items-center"><input   style="background-color: #e5e5e5;height:60rpx;padding:8px;margin-right:10px;" type="number" v-model="formData.price1" class="bj-price" placeholder="¥0.00"  placeholder-style=""/>元
						<text @tap.stop="showprice.price1=false" class=" items-end" style="margin-left:20rpx;color:#e5e5e5;border:1px solid #e5e5e5;display: inline-block; border-radius: 50%;width:40rpx;line-height:36rpx;text-align:center">-</text>
						</view>
						</view>

						<view class="flex-row justify-between  items-center text-wrapper_4" v-if='showprice.price2'>
						<text class="font_7 text_23 items-start" >航空运输 给出报价：</text>
						<view class="flex-row items-center"><input   style="background-color: #e5e5e5;height:60rpx;padding:8px;margin-right:10px;" type="number" v-model="formData.price2" class="bj-price" placeholder="¥0.00"  placeholder-style=""/>元
						<text @tap.stop="showprice.price2=false" class=" items-end" style="margin-left:20rpx;color:#e5e5e5;border:1px solid #e5e5e5;display: inline-block; border-radius: 50%;width:40rpx;line-height:36rpx;text-align:center">-</text>
						</view>
						</view>

						<view class="flex-row justify-between  items-center text-wrapper_4" v-if='showprice.price3'>
						<text class="font_7 text_23 items-start" >宠物专车 给出报价：</text>
						<view class="flex-row items-center"><input   style="background-color: #e5e5e5;height:60rpx;padding:8px;margin-right:10px;" type="number" v-model="formData.price3" class="bj-price" placeholder="¥0.00"  placeholder-style=""/>元
						<text @tap.stop="showprice.price3=false" class=" items-end" style="margin-left:20rpx;color:#e5e5e5;border:1px solid #e5e5e5;display: inline-block; border-radius: 50%;width:40rpx;line-height:36rpx;text-align:center">-</text>
						</view>
						</view>

						<view class="flex-row justify-between  items-center text-wrapper_4" v-if='showprice.price4'>
						<text class="font_7 text_23 items-start" >普通货车 给出报价：</text>
						<view class="flex-row items-center"><input   style="background-color: #e5e5e5;height:60rpx;padding:8px;margin-right:10px;" type="number" v-model="formData.price4"  class="bj-price" placeholder="¥0.00"  placeholder-style=""/>元
						<text @tap.stop="showprice.price4=false" class=" items-end" style="margin-left:20rpx;color:#e5e5e5;border:1px solid #e5e5e5;display: inline-block; border-radius: 50%;width:40rpx;line-height:36rpx;text-align:center">-</text>
						</view>

						</view>
						<view class="flex-row justify-between  items-center text-wrapper_4" v-if='showprice.price5'>
						<text class="font_7 text_23 items-start" >顺风车 给出报价：</text>
						<view class="flex-row items-center"><input   style="background-color: #e5e5e5;height:60rpx;padding:8px;margin-right:10px;" type="number" v-model="formData.price5"   class="bj-price"  placeholder="¥0.00"  placeholder-style=""/>元
						<text @tap.stop="showprice.price5=false" class=" items-end" style="margin-left:20rpx;color:#e5e5e5;border:1px solid #e5e5e5;display: inline-block; border-radius: 50%;width:40rpx;line-height:36rpx;text-align:center">-</text>
						</view>
						</view>




						<view class="flex-row justify-between  items-center text-wrapper_4">
							<text class="font_7 text_23">价格说明：	</text>

							<view class="flex-row items-center">
							<textarea v-model="formData.priceDesc" class="bj-desc" /></textarea>
						   </view>
						</view>


									<view class="flex-col justify-start items-center self-center text-wrapper_5" @click="addQuote">
										<text class="font_3">立即报价</text>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</u-popup>
	<!-- 省市区选择 province city area初始省市区设置 show:是否显示  @sureSelectArea：确认事件 @hideShow：隐藏事件-->
				<cc-selectDity :province="province" :city="city" :area="area" :show="show" @changeClick="changeClick" @sureSelectArea="onsetCity" @hideShow="onhideShow"></cc-selectDity>
				<cc-selectDity :province="provinceTo" :city="cityTo" :area="areaTo" :show="showTo" @changeClick="changeClickTo" @sureSelectArea="onsetCityTo" @hideShow="onhideShowTo"></cc-selectDity>
	</view>
</template>

<script>
	import getlocation from '@/components/getlocation/index.vue';
	import petData from '@/config/petData.config.js';

	const API = require('@/utils/api/tyOrder.js').default;
	const $ = require('@/utils/api.js');
	export default {
		components: {
				getlocation,
		},
		props: {},
		data() {
			return {

				show:false,
				showTo:false,
				province:"",
				city:"",
				area: "",
				provinceTo:"",
				cityTo:"",
				areaTo: "",

					height: "",
				top: uni.getStorageSync('bartop') ? uni.getStorageSync('bartop') : 0,
				petVolumeArray: ["小型", "中型", "大型", "都有"],

				petcatArray:petData.petcatArray,
				petTypeArray: petData.petTypeArray,
				petVolumeArray: petData.petVolumeArray,
				cageSizeArray: petData.cageSizeArray,
				shuttleArray: petData.shuttleArray,
				haulMethodArray: petData.haulMethodArray,
				addServiceMethodArray:petData.addServiceMethodArray,
				petGenderArray:petData.petGenderArray,
				petMedicineArray: petData.petMedicineArray,
				petStatusArray:	petData.petStatusArray,
				shuttleArray: petData.shuttleArray,
				pinxiangArray: petData.pinxiangArray,



				itemnow:{},
				showChaseDialog: false,
				list: [],
				totalPage: 1,
				page: 1,
				pageSize: 20,
				 // price_arr =[
					//  0:{
					// 	title:1,
					//  },1,2,3,4,5,6
				 // ]
				showprice:{
					price:true,
					price1:true,
					price2:true,
					price3:true,
					price4:true,
					price5:true,

				},
				formData:{
					price:"",
					price1:"",
					price2:"",
					price3:"",
					price4:"",
					price5:"",
					priceDesc:"",
					orderNo:null
				},
				currrentOrderNo:null,
				userInfo:null,
			};
		},
		onLoad(){
			let height = getApp().globalData.height;
			height = height-100;
			if(this.isIphonex) {
			height-=34;
			}
			this.height = height;

			this.getUserInfo();

		},
		onShow(){
				this.isLogin = this.$mStore.getters.isLogin;
		},
		mounted() {
			this.getList();
		},
		methods: {

	      getUserInfo() {
			  let _that = this;
			  console.log("getUserInfo","getUserInfo")
				this.getUser({
					success(res) {
						console.log("getUser res",res)
						 _that.userInfo = res;
						uni.setStorageSync('userInfo',res);
						console.log("getUser res.isTansport",res.isTansport)
						// if(!res.isTansport){
						// 			uni.redirectTo({
						// 			  url: '/pages/other/merchantApply'
						// 			});
						// }
						// uni.setStorageSync('userInfo',self.user);
					}
				})
			},
			goDetail(item){
				if (!this.isLogin) {
							uni.redirectTo({
								url:'/pages/user/passport/login'
							})
				}
				
				console.log("this.userInfo,",this.userInfo)
				if(this.userInfo.isTansport){
					this.go('/pages/ys/order/detail?orderNo='+item.orderNo)
				}else{
					this.Modal("您还没有成为运输商家！", '请先入驻成为运输商家才能正常使用', {
						showCancel: true,
					}).then(() => {
						uni.redirectTo({
							url:'/pages/other/merchantApply',
							
						})
					})
				}
			},
			goDetailPrice(item){
				if (!this.isLogin) {
							uni.redirectTo({
								url:'/pages/user/passport/login'
							})
				}
				console.log("this.isLogin",this.isLogin)
				if(this.userInfo.isTansport){
					this.go('/pages/ys/order/detail?baojia=1&orderNo='+item.orderNo)
				}else{
					this.Modal("您还没有成为运输商家！", '请先入驻成为运输商家才能正常使用', {
									showCancel: true,
					}).then(() => {
						uni.redirectTo({
							url:'/pages/other/merchantApply'
						})
					})
				}
			},
			openPicker() {
			       console.log('执行打开地址选择器')
			       this.show = true
			   },

			   changeClick(value, value2, value3){

			       console.log('地址选择器 = ' + value + value2 + value3);

			       this.province = value;
			       this.city = value2;
			       this.area = value3;

			   },
			   onhideShow() {
			       this.show = false
			       console.log('执行了关闭地址选择器')
			   },
			   //选中省市区
			   onsetCity(e) {
			       let data = e.detail.target.dataset;
			       let address = data.province + data.city + data.area;
			       this.show = false
			       this.addressData.address = address
			   },
			   //
			   switchChange(e) {

			   },



			openPickerTo() {
				   console.log('执行打开地址选择器')
				   this.showTo = true
			   },

			   changeClickTo(value, value2, value3){

				   console.log('地址选择器 = ' + value + value2 + value3);

				   this.provinceTo = value;
				   this.cityTo = value2;
				   this.areaTo = value3;

			   },
			   onhideShowTo() {
				   this.showTo = false
				   console.log('执行了关闭地址选择器')
			   },
			   //选中省市区
			   onsetCityTo(e) {
				   let data = e.detail.target.dataset;
				   let address = data.province + data.city + data.area;
				   this.showTo = false
				   this.addressData.address = address
			   },
			   //
			   switchChangeTo(e) {

			   },





			openAddress() {
														  this.$refs.scroll.open()
			},
			//地址选择成功
			chooseSuccess(e) {
														  console.log('所选择的地址信息:', e)


														  this.checkArr_t = e.value

														  if(e.value[0]){
															  self.province = e.value[0].label
															  self.provinceCode = e.value[0].value
														  }




														  if(e.value[1]){
																self.city = e.value[1].label
																self.cityCode = e.value[1].value
														  }else{
															  self.city = ""
															  self.cityCode =""
														  }



														  if(e.value[2]){

																self.area = e.value[2].label
																self.areaCode = e.value[2].value
														  }else{
															  self.area =""
															  self.areaCode = ""
														  }




			},

			delFrom(){
				this.province = '';
				this.city = '';
				this.area = '';
			},
			delTo(){
				this.provinceTo = '';
				this.cityTo = '';
				this.areaTo = '';
			},
			reset() {

				this.province = '';
				this.city = '';
				this.area = '';
				this.provinceTo = '';
				this.cityTo = '';
				this.areaTo = '';
			},
			seach() {
				this.page = 1;
				this.loadingType='more'
				this.getList();
				this.$refs.popup.close();
			},
			baojia(item){
				this.showprice = {
					price:true,
					price1:true,
					price2:true,
					price3:true,
					price4:true,
					price5:true,

				};
				this.showChaseDialog = true;
				console.log(item)

				this.itemnow = item
				this.currrentOrderNo = item.orderNo
					console.log(item.orderNo)
			},
			close() {
				this.showChaseDialog = false
			},
			open() {
			    this.showChaseDialog = true
			},
			btnClick() {
				this.showChaseDialog = true
			},
			addQuote(){
				let self = this;
				console.log(this.currrentOrderNo)
				this.formData.orderNo = this.currrentOrderNo;
				$.ajax({
					url: API.addQuoteApi,
					data: this.formData,
					method: 'post',
					success(res) {


						uni.showToast({
						title: res.message,
						icon: 'none'
						})

						setTimeout(() => {
							self.go('/pages/ys/order/chase');
							self.isflag = true
						}, 1000)
					}
				})
			},
			loadList() {
				if (this.page < this.totalPage) {
					this.page += 1;
					this.getList();
				}
			},
			getList() {
				
				
				let self = this;
				let chooseAddressinfo	 = 	uni.getStorageSync('chooseAddressinfo');
				let	currentAddressinfo	 =  uni.getStorageSync('currentAddressinfo');
				if(!chooseAddressinfo){
					chooseAddressinfo = currentAddressinfo
					uni.setStorageSync('chooseAddressinfo',chooseAddressinfo);

				}


				$.ajax({
					url: API.getChaseListApi,
					data: {
						page: self.page,
						pageSize: self.pageSize,
						province:self.province,
						city:self.city,
						area: self.area,
						provinceTo:self.provinceTo,
						cityTo:self.cityTo,
						areaTo: self.cityTo,
						latitude: chooseAddressinfo.latitude,
						longitude: chooseAddressinfo.longitude,
					},
					method: 'GET',
					success(res) {
						if (!res.data.list) {
							self.list = [];
							return;
						}
						let list = [];
						if (self.page != 1) {
							list = self.list.concat(res.data.list);
						} else {
							list = res.data.list ? res.data.list : [];
						}





						let newlist = [];
						if(list.length > 0) {
							list.forEach((item,index) => {
								// ele.moduleData = JSON.parse(ele.moduleData);
								// if(ele.moduleKey == 'goods') {//商品分类
								// 	ele.moduleData.list.forEach((ele1,idx1) => {
								// 		ele1['cateIndex'] = 0;
								// 	})
								// }

								var petType_arr = [];
								var petTypes=item.petType.split(",")

								for (let i = 0; i < petTypes.length; i++) {
										for (let j = 0; j < self.petcatArray.length; j++) {
												if(self.petcatArray[j].id==petTypes[i]){
														petType_arr.push(self.petcatArray[j].title)
														continue;
												}
										}
								}


								item.petType = petType_arr.join(",")



								item.petVolume = self.petVolumeArray[item.petVolume]
								item.cageSize = self.cageSizeArray[item.cageSize]
								// item.shuttle = self.shuttleArray[item.shuttle]
								// item.haulMethod = self.haulMethodArray[item.haulMethod]
								// item.addServiceMethod = self.addServiceMethodArray[item.shuttle]




								item.petPhoto=item.petPhoto.split(",")
								item.cagePhoto=item.cagePhoto.split(",")


										console.log("item",item)
								newlist.push(item);
							})
						}



						self.list = newlist;
						self.totalPage = res.data.totalPage;
					}
				})
			}
		},
	};
</script>

<style scoped lang="css">
	@import url('../../../static/css/style.css');

	view {  flex-shrink: 0;	}
	.page {

		background-color: #f5f7f7;
		width: 100%;
		overflow-y: auto;
		overflow-x: hidden;
		height: 100%;
	}

	.group {
		padding: 4rpx 12rpx 0;
	}

	.pos_2 {
		position: absolute;
		left: 12rpx;
		top: 50%;
		transform: translateY(-50%);
	}

	.image {
		width: 33rpx;
		height: 20rpx;
	}

	.font_1 {
		font-size: 24rpx;
	/* 	font-family: SourceHanSansCN;
		line-height: 22rpx; */
		color: #666e7a;
	}

	.text {
		margin-left: 8rpx;
		color: #383838;
	}

	.image_2 {
		width: 28rpx;
		height: 20rpx;
	}

	.font_2 {
		font-size: 24rpx;
		line-height: 18rpx;
		color: #383838;
	}

	.text_2 {
		font-weight: 700;
	}

	.pos_3 {
		position: absolute;
		right: 10rpx;
		top: 50%;
		transform: translateY(-50%);
	}

	.image_3 {
		width: 14rpx;
		height: 24rpx;
	}

	.text_3 {
		margin-left: 20rpx;
	}

	.image_4 {
		width: 48rpx;
		height: 23rpx;
	}

	.font_3 {
		font-size: 28rpx;
		line-height: 26rpx;
		color: #000000;
	}

	.text_4 {
		/* margin-top: 36rpx; */
	}

	.section_2 {
		margin: 28rpx 18rpx 0;
		padding: 22rpx 4rpx 176rpx 26rpx;
		background-color: #ffffff;
		border-radius: 20rpx;
		filter: drop-shadow(0px 0px 8rpx #ffbd5208);
		overflow: hidden;
	}

	.space-x-16>view:not(:first-child),
	.space-x-16>text:not(:first-child),
	.space-x-16>image:not(:first-child) {
		margin-left: 32rpx;
	}

	.text-wrapper {
		padding: 12rpx 0;
		background-color: #4578ff;
		border-radius: 6rpx;
		width: 88rpx;
		height: 44rpx;
	}

	.font_4 {
		font-size: 24rpx;
		line-height: 22rpx;
		color: #ffffff;
	}

	.space-x-8>view:not(:first-child),
	.space-x-8>text:not(:first-child),
	.space-x-8>image:not(:first-child) {
		margin-left: 16rpx;
	}

	.font_5 {
		flex-shrink: 0;
		font-size: 24rpx;
		line-height: 24rpx;
		color: #333;
	}

	.text_5 {
		line-height: 23rpx;
	}

	.image_5 {
		width: 42rpx;
		height: 16rpx;
	}

	.text_7 {
		line-height: 23rpx;
	}

	.font_6 {
		font-size: 22rpx;
		line-height: 36rpx;
		color: #333;
	}

	.text_6 {
		line-height: 20rpx;
	}

	.group_2 {
		padding-bottom: 22rpx;
	}

	.image_6 {
		border-radius: 4rpx;
		width: 120rpx;
		height: 120rpx;
	}

	.group_3 {
		margin-right: 6rpx;
	}

	.text_8 {
		margin-right: 104rpx;
	}

	.text-wrapper_2 {
		margin-right: 12rpx;
		padding: 16rpx 0;
		background-color: #ebebebd6;
		border-radius: 10rpx;
		overflow: hidden;
		/* height: 88rpx; */
	}

	.text_9 {
		margin-left: 24rpx;
		width: 586rpx;
	}

	.section_5 {
		margin: 28rpx 18rpx 0;
		background-color: #ffffff;
		border-radius: 20rpx;
		filter: drop-shadow(0px 0px 8rpx #ffbd5208);
		overflow: hidden;
		height: 518rpx;
	}

	.group_5 {
		padding-top: 28rpx;
	}

	.space-y-17>view:not(:first-child),
	.space-y-17>text:not(:first-child),
	.space-y-17>image:not(:first-child) {
		margin-top: 34rpx;
	}

	.section_7 {
		padding: 22rpx 4rpx 64rpx 26rpx;
		background-color: #ffffff;
		border-radius: 20rpx;
		filter: drop-shadow(0px 0px 8rpx #ffbd5208);
		overflow: hidden;
		margin-bottom: 16rpx;
	}

	.text_24 {
		line-height: 23rpx;
	}

	.text_25 {
		line-height: 23rpx;
	}

	.text_26 {
		line-height: 20rpx;
	}

	.group_6 {
		margin-right: 6rpx;
	}

	.space-y-8>view:not(:first-child),
	.space-y-8>text:not(:first-child),
	.space-y-8>image:not(:first-child) {
		margin-top: 16rpx;
	}

	.text_27 {
		margin-right: 104rpx;
	}

	.group_7 {
		padding: 36rpx 0;
	}

	.text-wrapper_6 {
		padding: 24rpx 0;
		border-radius: 386rpx;
		width: 261rpx;
		height: 75rpx;
		border: solid 1.2rpx #00000026;
	}

	.text-wrapper_7 {
		margin-right: 8rpx;
		padding: 24rpx 0;
		background-color: #ffd701;
		border-radius: 386rpx;
		width: 260rpx;
		height: 74rpx;
	}

	.section_8 {
		padding: 36rpx 48rpx;
		background-color: #ffffff;
		overflow: hidden;
	}

	.group_8 {
		width: 56rpx;
	}

	.space-y-6>view:not(:first-child),
	.space-y-6>text:not(:first-child),
	.space-y-6>image:not(:first-child) {
		margin-top: 12rpx;
	}

	.image_8 {
		width: 40rpx;
		height: 40rpx;
	}

	.font_8 {
		font-size: 20rpx;
		font-family: HarmonyOSSansSC;
		line-height: 18rpx;
		color: #666e7a;
	}

	.text_28 {
		color: #ffbd52;
	}

	.image_7 {
		width: 56rpx;
		height: 56rpx;
	}

	.font_9 {
		font-size: 20rpx;
		font-family: HarmonyOSSansSC;
		line-height: 19rpx;
		color: #666e7a;
	}

	.space-y-2>view:not(:first-child),
	.space-y-2>text:not(:first-child),
	.space-y-2>image:not(:first-child) {
		margin-top: 4rpx;
	}

	.image_9 {
		width: 48rpx;
		height: 48rpx;
	}

	.image_10 {
		width: 38rpx;
		height: 34rpx;
	}

	.section {
		padding: 432rpx 0 688rpx;
		background-color: #000000c9;
	}

	.pos {
		position: absolute;
		left: 0;
		right: 0;
		top: 0;
		bottom: 0;
	}

	.section_3 {
		margin: 0 20rpx;
		padding: 40rpx 6rpx 16rpx;
		background-color: #ffffff;
		border-radius: 10rpx;
		overflow: hidden;
	}

	.space-y-12>view:not(:first-child),
	.space-y-12>text:not(:first-child),
	.space-y-12>image:not(:first-child) {
		margin-top: 24rpx;
	}

	.text_10 {
		margin-left: 28rpx;
		color: #000000;
		font-size: 36rpx;
		font-weight: 700;
		line-height: 34rpx;
	}

	.section_4 {
		margin-right: 10rpx;
		padding: 22rpx 0 30rpx 20rpx;
		background-color: #ffffff;
		border-radius: 20rpx;
		filter: drop-shadow(0px 0px 8rpx #ffbd5208);
		overflow: hidden;
	}

	.space-y-23>view:not(:first-child),
	.space-y-23>text:not(:first-child),
	.space-y-23>image:not(:first-child) {
		margin-top: 46rpx;
	}

	.text_11 {
		line-height: 23rpx;
	}

	.text_12 {
		line-height: 23rpx;
	}

	.text_13 {
		margin-right: -8rpx;
		line-height: 20rpx;
	}

	.view {
		margin: 0 8rpx;
	}

	.space-x-10>view:not(:first-child),
	.space-x-10>text:not(:first-child),
	.space-x-10>image:not(:first-child) {
		margin-left: 20rpx;
	}

	.space-y-10>view:not(:first-child),
	.space-y-10>text:not(:first-child),
	.space-y-10>image:not(:first-child) {
		margin-top: 20rpx;
	}

	.text_14 {
		font-size: 22rpx;
		line-height: 20rpx;
	}

	.text_15 {
		margin-right: 92rpx;
		font-size: 22rpx;
		line-height: 20rpx;
	}

	.text_16 {
		font-size: 22rpx;
		line-height: 20rpx;
	}

	.text_17 {
		font-size: 22rpx;
		line-height: 20rpx;
	}

	.text_18 {
		font-size: 22rpx;
		line-height: 20rpx;
	}

	.text_19 {
		margin-right: 28rpx;
		font-size: 22rpx;
		line-height: 20rpx;
	}

	.text-wrapper_3 {
		margin-left: 4rpx;
		padding: 16rpx 0 20rpx;
		background-color: #ebebeb00;
		border-radius: 10rpx;
		overflow: hidden;
		width: 670rpx;
		height: 120rpx;
	}

	.text_20 {
		margin-left: 24rpx;

		width: 582rpx;
	}

	.group_4 {
		padding-top: 24rpx;
	}

	.section_6 {
		padding: 24rpx 28rpx;
		background-color: #f0edd542;
		border-radius: 394rpx;
	}

	.font_7 {
		font-size: 24rpx;
		font-family: HarmonyOSSansSC;
		line-height: 22rpx;
		color: #081329;
	}

	.text_21 {
		font-size: 22rpx;
		line-height: 21rpx;
	}

	.text_22 {
		font-size: 22rpx;
		line-height: 19rpx;
	}

	.text-wrapper_4 {
		margin-top: 8rpx;
		padding: 24rpx 0;
		background-color: #f0edd542;
		border-radius: 60rpx;
	}

	.text_23 {
		margin-left: 28rpx;
		font-size: 22rpx;
		line-height: 60rpx;
	}

	.text-wrapper_5 {
		margin-top: 20rpx;
		padding: 24rpx 0;
		background-color: #ffd701;
		border-radius: 386rpx;
		width: 260rpx;
	}
	.bj-price{
		display: inline-block;
		width: 300rpx;
	}
	.bj-desc{
		padding: 24rpx 28rpx;
		background-color: #f0edd542;
		display: inline-block;
		width: 500rpx;
		height:160rpx;
	}
</style>
